@import "~scss/variables";

.sw-cms-sidebar {
    .sw-sidebar-item {
        .sw-sidebar-item__headline {
            border-bottom: 1px solid $color-gray-300;
            padding: 25px 25px 0;
            margin: 0;
        }
    }

    .sw-cms-sidebar__navigator-section {
        padding: 12px 24px;
        border-bottom: 1px solid $color-gray-300;

        .sw-cms-sidebar__navigator-section-header {
            font-weight: $font-weight-semi-bold;
            font-size: $font-size-s;
            color: $color-darkgray-200;
            margin: 12px 0;
            display: grid;
            grid-template-columns: 1fr 34px;
        }
    }

    .sw-sidebar-collapse__title {
        font-size: $font-size-m;
    }

    .sw-cms-sidebar__settings {
        padding: 8px 24px;
    }

    .sw-media-compact-upload-v2 {
        margin-bottom: 22px;
    }

    .sw-cms-sidebar__block-overview {
        display: grid;
        grid-template-rows: 105px auto;
        height: 100%;
        overflow: hidden;
    }

    .sw-cms-sidebar__block-category {
        padding: 12px 24px;
        border-bottom: 1px solid $color-gray-300;

        .sw-field {
            margin: 0;
        }
    }

    .sw-cms-sidebar__block-selection {
        padding: 25px;
        overflow: scroll;
    }

    .sw-cms-sidebar__navigator-section-spacer {
        height: 1px;
        background: $color-gray-300;
        margin: 20px 0;
    }

    .sw-cms-sidebar__navigator-empty-element {
        border: 1px dashed $color-gray-300;
        background-color: #fff;
        color: $color-gray-500;
        padding: 8px 4px 8px 14px;
        text-align: center;
        border-radius: 4px;
    }

    .sw-entity-single-select__selection {
        white-space: nowrap;
        display: flex;
        align-items: center;
    }

    .sw-entity-single-select__selection-text {
        vertical-align: middle;
        padding-right: 16px;
        width: 100%;
    }

    &__navigator-confirm-modal-reminder {
        margin-top: 24px;
    }

    .sw-cms-sidebar__layout-assignment-content,
    .sw-cms-sidebar__layout-set-as-default-content {
        padding: 25px;
        border-bottom: 1px solid $color-gray-300;
    }

    .sw-cms-sidebar__layout-assignment-headline,
    .sw-cms-sidebar__layout-set-as-default-headline {
        color: $color-darkgray-200;
        font-size: $font-size-xs;
    }

    .sw-cms-sidebar__layout-assignment-info-text,
    .sw-cms-sidebar__layout-set-as-default-info-text {
        color: $color-darkgray-200;
        font-size: $font-size-xs;
        margin-bottom: 20px;
    }

    .sw-cms-sidebar__block-preview-with-actions {
        position: relative;

        .sw-cms-sidebar__block-favorite {
            right: 8px;
            bottom: 8px;
            position: absolute;

            .mt-icon.sw-cms-sidebar__icon-cms-block-favorite {
                color: $color-module-pink-800;
            }

            &:disabled {
                .mt-icon.sw-cms-sidebar__icon-cms-block-favorite {
                    color: $color-module-pink-200;
                }
            }
        }
    }
}

.sw-cms-sidebar__block-preview {
    margin: 0 0 7px;
    background: $color-white;
    border: 1px solid #d1d9e0;
    border-radius: 5px;
    background-clip: padding-box;
    cursor: grab;
    user-select: none;

    &.has--no-label {
        margin-bottom: 20px;
    }

    &.is--dragging {
        box-shadow: none;
        border: 1px dashed $color-gray-300;
        background-color: $color-gray-50;

        + .sw-cms-sidebar__block-favorite {
            display: none;
        }
    }

    &.is--drag-element,
    &.is--drag-element.is--valid-drag {
        border: 1px solid $color-shopware-brand-500;
        box-shadow: 0 0 4px 0 rgba($color-shopware-brand-500, 0.4);
    }

    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
        font-size: $font-size-s;
        line-height: $line-height-xs;
        margin: 0 0 6px;
    }

    p {
        font-size: $font-size-xxs;
        line-height: 14px;
    }

    hr {
        max-width: 100px;
        margin: 0 auto 10px;
        border: 2px solid $color-gray-300;
    }

    img {
        margin: 0;
        display: block;
        max-width: 100%;
        overflow: hidden;
    }
}

.sw-cms-sidebar__block-label {
    display: block;
    text-align: center;
    margin-bottom: 32px;
}
